import 'package:flutter/material.dart';
import 'package:maihealth/utils/constant.dart';
import 'package:maihealth/utils/screenUtil.dart';
class loadError extends StatelessWidget {
  final String errorText;
  final Function reload;
  const loadError({Key key, this.errorText,this.reload}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return Center(
      child: Container(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Padding(
              child:Text(errorText),
              padding: EdgeInsets.only(bottom: 5),
            ),
      
            FlatButton(
              child: Text('重新加载',style: TextStyle(color: Colors.white)),
              color: ThemeColor,
              onPressed: reload
            ,)
          ],
        ),
      )
    ); 
  }
}